import React, { PureComponent } from 'react';
import {  setLocale } from 'umi/locale';
import classNames from 'classnames';
import HeaderDropdown from '../HeaderDropdown';
import styles from './index.less';

export default class SelectLang extends PureComponent {
  changeLang = ({ key }) => {
    setLocale(key);
  };

  render() {
    const { className } = this.props;
    return (
      <HeaderDropdown placement="bottomRight">
        <span className={classNames(styles.dropDown, className)} />
      </HeaderDropdown>
    );
  }
}
